package exception;

public class Demo07_Exception_ByMyself {
    public static void main(String[] args) {

    }
}
//异常类
class AgeOutOfBoundsException extends Exception{
    public AgeOutOfBoundsException() {
    }

    public AgeOutOfBoundsException(String message) {
        super(message);
    }
}
//继承Exception编译时异常，必须在方法上抛出该异常
//继承RunTimeException运行时异常则不用
